﻿using IdentityModel;
using IdentityModel.Client;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Models.Identity;
using Models.JsonResultModel;
using System;
using UtilsORM.MySqlData;
using ServiceWeb.DBGateway;
using UtilsBase;
using UtilsORM.MySqlData;
using Models.WebClient;
using ServiceWeb.DBBase;
using ServiceWeb.WebClient;
using Microsoft.EntityFrameworkCore.Metadata.Internal;

namespace FileServer.Controllers.API.Common
{
    [Route("api/common/[controller]/[action]")]
    [ApiController]
    public class WifiController : ApiCommonControllerBase
    {
        [HttpGet]
        [HttpPost]
        public RespResultData getWifiList()
        {
            return RespResult.Sucess(new ServiceWifis().getLinuxWifiList());
        }

        [HttpGet]
        [HttpPost]
        public RespResultData getWifiLink()
        {
            return RespResult.Sucess(new ServiceWifis().getLinuxWifiLink());
        }


        [HttpGet]
        [HttpPost]
        public RespResultData setLinuxWifiContent(string ssid, string key)
        {
            return RespResult.Sucess(new ServiceWifis().setLinuxWifiContent(ssid, key));
        }
    }
}
